﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HighSchoolDetailInfo.aspx.cs" Inherits="Sagacity.NC.Web.BaokaoManager.HighSchool.HighSchoolDetailInfo" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title>学校详细信息</title>
    <link rel="stylesheet" type="text/css" href="../../resources/css/main.css" />
    <script type="text/javascript" src="../../resources/JS/ExampleTab.js"></script>
</head>
<body>
    <form runat="server" id="form1">
    <script language="javascript" type="text/javascript">
        var mainResourceId = <%=mainResourceId %>;
        var highSchoolId = <%=highSchoolId %>;
        function getSchoolInfo(resourceId,controlType){
             var url = "HighSchoolOtherInfo.aspx";
             var style = 2;
             
             if(resourceId == mainResourceId)
                url = "HighSchoolBaseInfo.aspx";
            
            url += "?ResourceId="+resourceId + "&HighSchoolId="+ highSchoolId + "&showStyle="+style+"&ControlType="+controlType;
            
            tabSchoolInfoTabs.activeTab.autoLoad.url = url;
            tabSchoolInfoTabs.activeTab.reload();
            if(highSchoolId==0)
            openOrCollapseWest(true);
            else
            openOrCollapseWest(false);
        }
        
              function openOrCollapseWest(oc) {
            oc ? pnlWest.collapse() : pnlWest.expand();
        }
    </script>
    <ext:ScriptManager ID="ScriptManager1" CleanResourceUrl="false" runat="server" />
    <asp:HiddenField ID="hidStyleId" Value="3" runat="server" />
    <ext:ViewPort ID="ViewPort1" runat="server">
        <Body>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <West Collapsible="true" CollapseMode="Mini" Split="true">
                    <ext:Panel ID="pnlWest" BodyStyle="overflow-x:hidden;" runat="server" AutoScroll="true"
                        Header="false" Border="false" Width="220">
                        <Body>
                             <table style="width: 100%;">
                                <tr style="width: 100%;">
                                    <td align="center">
                                        <asp:Literal ID="Literal2" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                                <tr style="height: 10px;">
                                    <td>
                                    </td>
                                </tr>
                            </table>
                            <table style="width: 100%;">
                                <tr style="width: 100%;">
                                    <td align="center">
                                        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                                <tr style="height: 10px;">
                                    <td>
                                    </td>
                                </tr>
                            </table>
                            <table style="width: 100%;">
                                <asp:Repeater ID="Repeater1" runat="server">
                                    <ItemTemplate>
                                        <tr style="height: 25px; width: 100%;">
                                            <td align="center" id="td<%#Eval("Id") %>" onclick="javascript:getSchoolInfo(<%#Eval("Id") %>,<%#Eval("ControlType") %>);">
                                                <span style="cursor: pointer">
                                                    <%#Eval("ResourceName")%></span>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </Body>
                    </ext:Panel>
                </West>
                <Center>
                    <ext:TabPanel ID="tabSchoolInfoTabs" runat="server" ActiveTabIndex="0" EnableTabScroll="true">
                        <Tabs>
                            <ext:Tab ID="tabPersonInfo" runat="server" Icon="User" Title="普通高中信息" AutoScroll="true">
                                <AutoLoad Mode="IFrame" NoCache="true" ShowMask="true" MaskMsg="加载普通高中信息....">
                                </AutoLoad>
                            </ext:Tab>
                        </Tabs>
                        <Plugins>
                            <ext:TabCloseMenu ID="TabCloseMenu1" runat="server" />
                        </Plugins>
                    </ext:TabPanel>
                </Center>
            </ext:BorderLayout>
        </Body>
    </ext:ViewPort>
    <script language="javascript" type="text/javascript">        
        Ext.onReady(function(){                
             document.getElementById("td"+mainResourceId).click();
       });
    </script>
    </form>
</body>
</html>
